﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LinqProviders.Utility
{
    public static class ConversionHelpers
    {

        /// <summary>
        /// Toes the URI.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public static Uri ToUri(string value)
        {
            return ToUri(value, UriKind.Absolute);
        }

        /// <summary>
        /// Toes the URI.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <param name="uriKind">Kind of the URI.</param>
        /// <returns></returns>
        public static Uri ToUri(string value, UriKind uriKind)
        {
            Uri result = null;
            bool isSucceed = false;
            isSucceed = Uri.TryCreate(value, UriKind.Absolute, out result);
            return result;
        }

        
    }
}
